package cn.mldn.microboot;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * description:
 * Created by gy on 2017/8/9.
 */
@SpringBootApplication
@ImportResource(locations = {"classpath:spring-common.xml"})
@MapperScan("cn.mldn.microboot.dao")
@EnableTransactionManagement
@EnableScheduling
public class StartSpringBootMain extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(StartSpringBootMain.class);
    }

    public static void main(String[] args) throws Exception {
        SpringApplication.run(StartSpringBootMain.class, args);
    }


}
